import request from '@/utils/request'

// 查询账号信息列表
export function listAuthcodeInfo(query) {
  return request({
    url: '/auth/code/list',
    method: 'get',
    params: query
  })
}

export function listAllAuthcodeInfo(query) {
  return request({
    url: '/auth/code/list/all',
    method: 'get',
    params: query
  })
}

// 查询账号信息详细
export function getAuthcodeInfo(id) {
  return request({
    url: '/auth/code/' + id,
    method: 'get'
  })
}
// 查询用户
export function getApplicationUserInfo() {
  return request({
    url: '/system/user/list/select?userName=',
    method: 'get'
  })
}
// 查询产品
export function listAllDataProduct1(query) {
  return request({
    url: '/dataProduct/list',
    method: 'get',
    params: query
  })
}
// 新增账号信息
export function addAuthcodeInfo(data) {
  return request({
    url: '/auth/code',
    method: 'post',
    data: data
  })
}
// 授权
export function operateAuthcodeInfo(data) {
  return request({
    url: '/auth/code/operate',
    method: 'post',
    data: data
  })
}
// 修改账号信息
export function updateAuthcodeInfo(data) {
  return request({
    url: '/auth/code',
    method: 'put',
    data: data
  })
}

// 删除账号信息
export function delAuthcodeInfo(id) {
  return request({
    url: '/auth/code/' + id,
    method: 'delete'
  })
}
